package com.desire.common;

import com.desire.fiilter.JwtFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;

import java.util.logging.FileHandler;

/**
 * 这是Jwt配置，用于设置要过滤的网址“ / secure / *”
 */
public class JwtCfg {
    public FilterRegistrationBean jwtFiler() {
        final FilterRegistrationBean registrationBean = new FilterRegistrationBean();
        registrationBean.setFilter(new JwtFilter());
        registrationBean.addUrlPatterns("/user/*");
        return registrationBean;
    }
}
